package com.hudilao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hudilao.entity.CustomerMembership;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.math.BigDecimal;

@Mapper
public interface CustomerMembershipMapper extends BaseMapper<CustomerMembership> {

    /**
     * 根据会员id更新个人信息
     * @param id  用户id
     * @param balance 余额
     */
    @Update("update customer_membership set balance=#{balance} where id=#{id}")
    void updateBalanceById(long id, BigDecimal balance);

}
